#include "editorfactory.h"
#include "dtwentymodel.h"
#include "characterclassform.h"
#include "characterclass.h"
#include <QMetaType>


AbstractEditor *EditorFactory::editorWidget(const QModelIndex &index)
{
    int type = index.data(DTwentyModel::Role_TYPE).toInt();

    if (type == qMetaTypeId<CharacterClass*>())
    {
        return new CharacterClassForm();
    }

    return 0;
}
